import axios from '../axios'

export const findAllUser = () => axios.request<UserModel[]>({ url: 'admin/user/findall' })

export const upUserStatus = (id: number) => axios.request({ url: `admin/user/${id}`, method: 'put' })

export const deleteUser = (id: number) => axios.request({ url: `admin/user/${id}`, method: 'delete' })

export const findUserByUsername = (username: string) =>
   axios.request<UserModel[]>({ url: `admin/user/findone/${username}` })
